<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head th:replace="layouts::header"></head>
<body>
<nav th:replace="layouts::navbar"></nav>
<div class="container">

    <div class="logo"></div>
    <hr>
    <h3>当前进货单明细表</h3>
    <br>
    <a th:href="@{/pDetails/new}" class="btn btn-primary btn-sm mb-3">新增进货明细</a>
    <br>
    <table class="table table-bordered table-striped">
        <thead class="thead-dark">
        <tr>
            <th>商品ID</th>
            <th>进货数量</th>
            <th>进货总价</th>
            <th>进货单价</th>
            <th>活动</th>
        </tr>
        </thead>
        <tbody>
        <tr th:each="aPDetails : ${commodityPD}">
            <td th:text="${aPDetails.many}"></td>
            <td th:text="${aPDetails.quantity}"></td>
            <td th:text="${aPDetails.amount}"></td>
            <td th:text="${aPDetails.price}"></td>
            <td>
                <a th:href="@{/pDetails/update(id=${aPDetails.pdId})}" class="btn btn-info btn-sm">更新</a>
                <a
                        th:href="@{/pDetails/delete(id=${aPDetails.pdId})}"
                        class="btn btn-danger btn-sm"
                        onclick="if(!(confirm('你确定删除这个负责人吗'))) return false"
                >删除</a>
            </td>
        </tr>
        </tbody>
    </table>

</div>


</body>
</html>